import 'package:flutter_nb_net/flutter_net.dart';

class NotificationConfigResp extends BaseNetModel {
  int? code;
  String? msg;
  NotificationConfigData? data;

  NotificationConfigResp({this.code, this.msg, this.data});

  @override
  fromJson(Map<String, dynamic> json) {
    return NotificationConfigResp(
      code: json['code'],
      msg: json['msg'],
      data: json['data'] == null ? null : NotificationConfigData().fromJson(json['data']),
    );
  }
}

class NotificationConfigData extends BaseNetModel {
  bool? mainSwitch;

  NotificationConfigData({this.mainSwitch});

  @override
  fromJson(Map<String, dynamic> json) {
    return NotificationConfigData(
      mainSwitch: json['mainSwitch'] == '1',
    );
  }
}
